package com.yzy.fly.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface CustomSqlMapper {

    //    @Select("${ew.customSqlSegment}")
//    Map selectOne(@Param(Constants.WRAPPER) Wrapper<Map> wrapper);
//
//    @Select("{ew.customSqlSegment}")
//    List<Map> selectAll(@Param(Constants.WRAPPER) Wrapper<Map> wrapper);

    @Select("${customSql}")
    void ddl(@Param("customSql") String sql);

    @Select("${customSql}")
    Long selectCount(@Param("customSql") String sql);

    @Select("${customSql}")
    Map selectOne(@Param("customSql") String sql);

    @Select("${customSql}")
    List<Map> selectAll(@Param("customSql") String sql);

    @Insert("${customSql}")
    int insert(@Param("customSql") String sql);
}
